package com.lhn.formssi.util;

public class RedisUtil{	
	//过期时间
	private int expireSeconds;
	
	//传入一个对象
	private Class<?> clazz;
	
	public RedisUtil(int expireSeconds, Class<?> clazz) {
		this.expireSeconds = expireSeconds;
		this.clazz = clazz;
	}
		
	//获取生成的key
	public String getPrefix() {
		String prefix = "formssi";
		prefix = prefix + ":" + clazz.getSimpleName();
		return prefix;
	}
	
	//设置过期时间
	public int getExpireSeconds() {
		return expireSeconds;
	}
}
